<%@ include file="/decorator/taglibs.jsp"%>
<%@ page import="org.springframework.security.ui.AbstractProcessingFilter" %>
<%@ page import="org.springframework.security.ui.webapp.AuthenticationProcessingFilter" %>
<%@ page import="org.springframework.security.AuthenticationException" %>

<head>

<title>Login</title>

<script type="text/javascript">
			$(function(){			
				
					$('#login-div').dialog({ width: 450 });		
					$('#username').focus();
			});
		</script>

</head>
     

<div id="login-div">
    	<c:if test="${not empty param.login_error}">
    		<div class="errors">
    			Your login attempt was not successful, try again.<br /><br />
    			Reason: <%= ((AuthenticationException) session.getAttribute(AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>
    		</div>
    	</c:if>
    <center>	<img src="<c:url value='/images/logo.png'/>" width="165" height="36" /></center>
	<form method="post" action="<c:url value="/j_spring_security_check" />">
   <fieldset>
            <legend>Login</legend>
		<p><label class="lo">User Name:</label><br/>
			<input type="text" name="j_username" class="title" id="username"/>
      	
		</p>
        
          <p><label class="lo">Password :</label><br/>
            <input type="password" name="j_password" class="title"/>
          </p>     	

      		<p><button class="ui-state-default ui-corner-all" type="submit">Login</button> <label>OR You can </label><a class="ui-state-default ui-corner-all command" href='<c:url value="/user/form.htm" />'>Register</a></p>
       </fieldset>
      </form>
</div>



